package com.sphd.beautysalon.presenter;


import android.util.Log;

import com.android.volley.VolleyError;
import com.sphd.beautysalon.view.RegistView;
import com.sphd.beautysalon.model.RegistModelImpl;

/**
 * Created by Hu on 2016/10/27
 */

public class RegistPresenterImpl implements RegistPresenter {
    RegistView registView;
    RegistModelImpl registModel;

    public RegistPresenterImpl(RegistView registView) {
        this.registView = registView;
        registModel = new RegistModelImpl();
    }

    @Override
    public void addData(String url) {
        Log.e("tag==", url);
        registView.showLoading();
        registModel.sendUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        registView.dissLoading();
    }

    @Override
    public void sendRes(int res) {
        registView.sendRes(res);
        registView.dissLoading();
    }
}